package com.zx.zxapiorder.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zx.zxapicommon.common.BaseResponse;
import com.zx.zxapicommon.model.dto.ApiOrderCancelDto;
import com.zx.zxapiorder.model.dto.ApiOrderDto;
import com.zx.zxapiorder.model.entity.ApiOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zx.zxapiorder.model.to.ApiOrderStatusInfoDto;
import com.zx.zxapiorder.model.vo.ApiOrderStatusVo;
import com.zx.zxapiorder.model.vo.OrderSnVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author Bro
 * @description 针对表【api_order】的数据库操作Service
 * @createDate 2023-07-16 12:58:04
 */
public interface ApiOrderService extends IService<ApiOrder> {

    BaseResponse<OrderSnVo> generateOrderSn(ApiOrderDto apiOrderDto, HttpServletRequest request, HttpServletResponse response) throws ExecutionException, InterruptedException;

    BaseResponse generateToken(Long id, HttpServletResponse response);

    BaseResponse<Page<ApiOrderStatusVo>> getCurrentOrderInfo(ApiOrderStatusInfoDto statusInfoDto, HttpServletRequest request);


    BaseResponse cancelOrderSn(ApiOrderCancelDto apiOrderCancelDto, HttpServletRequest request, HttpServletResponse response);

    void orderPaySuccess(String replace);
}
